/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package pe.com.cotelasa.scp.entidad;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Jorge
 */
@Entity
@Table(name = "venta_caja",catalog = "bdcotelasa", schema = "cotelasa")
@NamedQueries({
    @NamedQuery(name = "VentaCaja.findAll", query = "SELECT v FROM VentaCaja v"),
    @NamedQuery(name = "VentaCaja.findByCodcaja", query = "SELECT v FROM VentaCaja v WHERE v.codcaja = :codcaja"),
    @NamedQuery(name = "VentaCaja.findByFecha", query = "SELECT v FROM VentaCaja v WHERE v.fecha = :fecha"),
    @NamedQuery(name = "VentaCaja.findByVendedor", query = "SELECT v FROM VentaCaja v WHERE v.vendedor = :vendedor"),
    @NamedQuery(name = "VentaCaja.findByAperturaSoles", query = "SELECT v FROM VentaCaja v WHERE v.aperturaSoles = :aperturaSoles"),
    @NamedQuery(name = "VentaCaja.findByEfectivoSoles", query = "SELECT v FROM VentaCaja v WHERE v.efectivoSoles = :efectivoSoles"),
    @NamedQuery(name = "VentaCaja.findByTarjetaSoles", query = "SELECT v FROM VentaCaja v WHERE v.tarjetaSoles = :tarjetaSoles"),
    @NamedQuery(name = "VentaCaja.findByChequesSoles", query = "SELECT v FROM VentaCaja v WHERE v.chequesSoles = :chequesSoles"),
    @NamedQuery(name = "VentaCaja.findByCreditoSoles", query = "SELECT v FROM VentaCaja v WHERE v.creditoSoles = :creditoSoles"),
    @NamedQuery(name = "VentaCaja.findByTotalSoles", query = "SELECT v FROM VentaCaja v WHERE v.totalSoles = :totalSoles"),
    @NamedQuery(name = "VentaCaja.findByHoraApertura", query = "SELECT v FROM VentaCaja v WHERE v.horaApertura = :horaApertura"),
    @NamedQuery(name = "VentaCaja.findByHoraCierre", query = "SELECT v FROM VentaCaja v WHERE v.horaCierre = :horaCierre"),
    @NamedQuery(name = "VentaCaja.findByAperturaDolar", query = "SELECT v FROM VentaCaja v WHERE v.aperturaDolar = :aperturaDolar"),
    @NamedQuery(name = "VentaCaja.findByEfectivoDolar", query = "SELECT v FROM VentaCaja v WHERE v.efectivoDolar = :efectivoDolar"),
    @NamedQuery(name = "VentaCaja.findByTarjetaDolar", query = "SELECT v FROM VentaCaja v WHERE v.tarjetaDolar = :tarjetaDolar"),
    @NamedQuery(name = "VentaCaja.findByChequeDolar", query = "SELECT v FROM VentaCaja v WHERE v.chequeDolar = :chequeDolar"),
    @NamedQuery(name = "VentaCaja.findByCreditoDolar", query = "SELECT v FROM VentaCaja v WHERE v.creditoDolar = :creditoDolar"),
    @NamedQuery(name = "VentaCaja.findByTotalDolar", query = "SELECT v FROM VentaCaja v WHERE v.totalDolar = :totalDolar"),
    @NamedQuery(name = "VentaCaja.findByDepositoSoles", query = "SELECT v FROM VentaCaja v WHERE v.depositoSoles = :depositoSoles"),
    @NamedQuery(name = "VentaCaja.findByDepositoDolar", query = "SELECT v FROM VentaCaja v WHERE v.depositoDolar = :depositoDolar")})
public class VentaCaja implements Serializable {
    private static final long serialVersionUID = 1L;
    
    @Id
    @SequenceGenerator(name = "generadorVentaCaja", sequenceName = "cotelasa.venta_caja_id_seq")
    @GeneratedValue(generator = "generadorVentaCaja")    
    @Basic(optional = false)
    @Column(name = "codcaja")
    private Integer codcaja;
    @Column(name = "fecha")
    @Temporal(TemporalType.DATE)
    private Date fecha;
    @Column(name = "vendedor")
    private Integer vendedor;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Column(name = "apertura_soles")
    private Double aperturaSoles;
    @Column(name = "efectivo_soles")
    private Double efectivoSoles;
    @Column(name = "tarjeta_soles")
    private Double tarjetaSoles;
    @Column(name = "cheques_soles")
    private Double chequesSoles;
    @Column(name = "credito_soles")
    private Double creditoSoles;
    @Column(name = "total_soles")
    private Double totalSoles;
    @Column(name = "hora_apertura")
    @Temporal(TemporalType.TIMESTAMP)
    private Date horaApertura;
    @Column(name = "hora_cierre")
    @Temporal(TemporalType.TIMESTAMP)
    private Date horaCierre;
    @Column(name = "apertura_dolar")
    private Double aperturaDolar;
    @Column(name = "efectivo_dolar")
    private Double efectivoDolar;
    @Column(name = "tarjeta_dolar")
    private Double tarjetaDolar;
    @Column(name = "cheque_dolar")
    private Double chequeDolar;
    @Column(name = "credito_dolar")
    private Double creditoDolar;
    @Column(name = "total_dolar")
    private Double totalDolar;
    @Column(name = "deposito_soles")
    private Double depositoSoles;
    @Column(name = "deposito_dolar")
    private Double depositoDolar;

    public VentaCaja() {
    }

    public VentaCaja(Integer codcaja) {
        this.codcaja = codcaja;
    }

    public Integer getCodcaja() {
        return codcaja;
    }

    public void setCodcaja(Integer codcaja) {
        this.codcaja = codcaja;
    }

    public Date getFecha() {
        return fecha;
    }

    public void setFecha(Date fecha) {
        this.fecha = fecha;
    }

    public Integer getVendedor() {
        return vendedor;
    }

    public void setVendedor(Integer vendedor) {
        this.vendedor = vendedor;
    }

    public Double getAperturaSoles() {
        return aperturaSoles;
    }

    public void setAperturaSoles(Double aperturaSoles) {
        this.aperturaSoles = aperturaSoles;
    }

    public Double getEfectivoSoles() {
        return efectivoSoles;
    }

    public void setEfectivoSoles(Double efectivoSoles) {
        this.efectivoSoles = efectivoSoles;
    }

    public Double getTarjetaSoles() {
        return tarjetaSoles;
    }

    public void setTarjetaSoles(Double tarjetaSoles) {
        this.tarjetaSoles = tarjetaSoles;
    }

    public Double getChequesSoles() {
        return chequesSoles;
    }

    public void setChequesSoles(Double chequesSoles) {
        this.chequesSoles = chequesSoles;
    }

    public Double getCreditoSoles() {
        return creditoSoles;
    }

    public void setCreditoSoles(Double creditoSoles) {
        this.creditoSoles = creditoSoles;
    }

    public Double getTotalSoles() {
        return totalSoles;
    }

    public void setTotalSoles(Double totalSoles) {
        this.totalSoles = totalSoles;
    }

    public Date getHoraApertura() {
        return horaApertura;
    }

    public void setHoraApertura(Date horaApertura) {
        this.horaApertura = horaApertura;
    }

    public Date getHoraCierre() {
        return horaCierre;
    }

    public void setHoraCierre(Date horaCierre) {
        this.horaCierre = horaCierre;
    }

    public Double getAperturaDolar() {
        return aperturaDolar;
    }

    public void setAperturaDolar(Double aperturaDolar) {
        this.aperturaDolar = aperturaDolar;
    }

    public Double getEfectivoDolar() {
        return efectivoDolar;
    }

    public void setEfectivoDolar(Double efectivoDolar) {
        this.efectivoDolar = efectivoDolar;
    }

    public Double getTarjetaDolar() {
        return tarjetaDolar;
    }

    public void setTarjetaDolar(Double tarjetaDolar) {
        this.tarjetaDolar = tarjetaDolar;
    }

    public Double getChequeDolar() {
        return chequeDolar;
    }

    public void setChequeDolar(Double chequeDolar) {
        this.chequeDolar = chequeDolar;
    }

    public Double getCreditoDolar() {
        return creditoDolar;
    }

    public void setCreditoDolar(Double creditoDolar) {
        this.creditoDolar = creditoDolar;
    }

    public Double getTotalDolar() {
        return totalDolar;
    }

    public void setTotalDolar(Double totalDolar) {
        this.totalDolar = totalDolar;
    }

    public Double getDepositoSoles() {
        return depositoSoles;
    }

    public void setDepositoSoles(Double depositoSoles) {
        this.depositoSoles = depositoSoles;
    }

    public Double getDepositoDolar() {
        return depositoDolar;
    }

    public void setDepositoDolar(Double depositoDolar) {
        this.depositoDolar = depositoDolar;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (codcaja != null ? codcaja.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof VentaCaja)) {
            return false;
        }
        VentaCaja other = (VentaCaja) object;
        if ((this.codcaja == null && other.codcaja != null) || (this.codcaja != null && !this.codcaja.equals(other.codcaja))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "pruebas.VentaCaja[ codcaja=" + codcaja + " ]";
    }
    
}
